﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="user_list.aspx.cs" Inherits="ByteSite.Web.admin.users.user_list" ValidateRequest="false" %>
<%@ Import namespace="ByteSite.Common" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>会员管理</title>
<link rel="stylesheet" type="text/css" href="../../scripts/artdialog/ui-dialog.css" />


<link rel="stylesheet" type="text/css" href="../skin/default/style.css" />
<link href="../skin/uikit/css/uikit.min.css" rel="stylesheet" />
<script type="text/javascript" src="../skin/uikit/js/uikit.min.js"></script>
<script type="text/javascript" src="../skin/uikit/js/uikit-icons.min.js"></script>
<script type="text/javascript" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../../scripts/artdialog/dialog-plus-min.js"></script>
<script type="text/javascript" src="../../scripts/xm-select/xm-select.js"></script>
<script type="text/javascript" src="../../scripts/laydate/laydate.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
</head>

<body class="mainbody">
<form id="form1" runat="server">


<!--工具栏-->

<div class="uk-grid-match uk-child-width-auto uk-flex-between uk-grid">
    <div class="uk-first-column">
        <div class="uk-panel">
            <div class="uk-button-group uk-first-column">
                <a class="uk-button uk-button-default" uk-icon="check" href="javascript:;" onclick="checkAll(this);" uk-tooltip="全选"></a>
                <a class="uk-button uk-button-default" uk-icon="plus" href="user_edit.aspx?action=<%=DTEnums.ActionEnum.Add %>" uk-tooltip="新增"></a>
                <%--<a class="uk-button uk-button-default" uk-icon="mail" onclick="PostSMS();" uk-tooltip="短信"></a>--%>
                <asp:LinkButton ID="btnDelete" runat="server" uk-icon="trash" CssClass="uk-button uk-button-default" OnClientClick="return ExePostBack('btnDelete');" onclick="btnDelete_Click" uk-tooltip="删除"></asp:LinkButton>
                <div class="">                    
                    <button type="button" class="uk-button uk-button-default" uk-icon="list" uk-tooltip="选择更多筛选条件"></button>
                    <div class="uk-width-xxlarge" uk-dropdown="mode:click">
                        <div class="uk-dropdown-grid" uk-grid>
                            <div class="uk-first-column uk-width-1-2">
                                <asp:DropDownList ID="ddlSiteId" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlSiteId_SelectedIndexChanged"></asp:DropDownList>
                            </div>
                            <div class="uk-width-1-2">
                                <asp:DropDownList ID="ddlGroupId" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlGroupId_SelectedIndexChanged"></asp:DropDownList>
                            </div>
                            <div class="uk-width-1-2">
                                <asp:TextBox ID="txtStartTime" runat="server" autocomplete="off" placeholder="开始时间" CssClass="uk-input uk-form-width-medium uk-input-datetime" date-format="yyyy-MM-dd" date-range="false"></asp:TextBox>
                            </div>
                            <div class="uk-width-1-2">
                                <asp:TextBox ID="txtEndTime" runat="server" autocomplete="off" placeholder="结束时间" CssClass="uk-input uk-form-width-medium uk-input-datetime" date-format="yyyy-MM-dd" date-range="false"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div>
        <div class="uk-panel">
            <div class="uk-margin" uk-margin>
                <asp:TextBox ID="txtKeywords" runat="server" CssClass="uk-input uk-form-width-medium" />
                <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="uk-button uk-button-default" onclick="btnSearch_Click" uk-icon="search"></asp:LinkButton>
            </div>
        </div>
    </div>
</div>
<!--/工具栏-->

<!--列表-->
<div class="table-container">
<asp:Repeater ID="rptList" runat="server">
<HeaderTemplate>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="uk-table uk-table-striped uk-table-justify uk-table-middle uk-table-hover uk-table-divider">
  <thead><tr>
    <th width="8%">选择</th>
    <th colspan="2"class="uk-text-left" >用户名</th>
    <th width="12%">会员组</th>
    <th width="12%">邮箱</th>
    <th width="8%">余额</th>
    <th width="8%">积分</th>
    <th width="8%">状态</th>
    <th width="8%">操作</th>
  </tr></thead>
</HeaderTemplate>
<ItemTemplate>
  <tr>
    <td align="center">
      <asp:CheckBox ID="chkId" CssClass="checkall uk-checkbox" runat="server" />
      <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
      <input name="hidMobile" type="hidden" value="<%#Eval("mobile")%>" />
    </td>
    <td width="64" class="uk-text-left" >
      <a class="user-avatar" href="user_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>">
        <%#Eval("avatar").ToString() != "" ? "<img width=\"64\" height=\"64\" src=\"" + Eval("avatar") + "\" />" : "<span uk-icon=\"icon: user; ratio: 2\"></span>"%>
      </a>
    </td>
    <td class="uk-text-left" >
      <div class="user-box">
        <b><%#Eval("user_name")%></b> (昵称：<%#Eval("nick_name")%>)
        <div class="uk-margin-top">
            <div class="uk-button-group uk-first-column">
              <a class="uk-button uk-button-default uk-button-small" href="amount_log.aspx?keywords=<%#Eval("user_name")%>" uk-icon="icon: cart; ratio: 0.8" uk-tooltip="消费记录"></a>
              <a class="uk-button uk-button-default uk-button-small" href="recharge_list.aspx?keywords=<%#Eval("user_name")%>" uk-icon="icon: credit-card; ratio: 0.8" uk-tooltip="充值记录"></a>
              <a class="uk-button uk-button-default uk-button-small" href="point_log.aspx?keywords=<%#Eval("user_name")%>" uk-icon="icon: star; ratio: 0.8" uk-tooltip="积分记录"></a>
              <a class="uk-button uk-button-default uk-button-small" href="message_list.aspx?keywords=<%#Eval("user_name")%>" uk-icon="icon: commenting; ratio: 0.8" tooltip="消息记录"></a>
            </div>
        </div>
      </div>
    </td>
    <td><%#new ByteSite.BLL.user_groups().GetTitle(Convert.ToInt32(Eval("group_id")))%></td>
    <td><%#Eval("email")%></td>
    <td align="center"><%#Eval("amount")%></td>
    <td align="center"><%#Eval("point")%></td>
    <td align="center"><%#GetUserStatus(Convert.ToInt32(Eval("status")))%></td>
    <td align="center"><a href="user_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>">修改</a></td>
  </tr>
</ItemTemplate>
<FooterTemplate>
  <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"9\">暂无记录</td></tr>" : ""%>
</table>
</FooterTemplate>
</asp:Repeater>
</div>
<!--/列表-->

<!--内容底部-->
<div class="line20"></div>
<div class="uk-grid-small uk-grid-match uk-child-width-expand uk-grid" uk-grid>
    <div class="uk-width-small uk-first-column">
        <div class="uk-panel">
            <div class="l-btns">
                <asp:TextBox ID="txtPageNum" runat="server" CssClass="uk-input uk-form-width-xsmall" onkeydown="return checkNumber(event);"
                 OnTextChanged="txtPageNum_TextChanged" AutoPostBack="True"></asp:TextBox><span> 条/页</span>
              </div>
        </div>
    </div>
    <div>
        <div class="uk-panel">
            <ul id="PageContent" runat="server" class="uk-pagination"></ul>
        </div>
    </div>
</div>
<!--/内容底部-->

</form>
</body>
</html>
